home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / pcl / sptmbr16.lha / sysdef.lisp < prev    next >
Lisp/Scheme  |  1993-01-04  |  4KB  |  122 lines

  1. ;;; -*- Mode: Lisp; Base: 10; Syntax: Common-Lisp; Package: DSYS -*-
  2. ;;; File: sysdef.lisp 
  3. ;;; Author: Richard Harris
  4.  
  5. (in-package "DSYS")
  6.  
  7. (defvar *pcl-compiled-p* nil)
  8. (defvar *pcl-loaded-p* nil)
  9.  
  10. (unless (boundp 'pcl::*redefined-functions*)
  11.   (setq pcl::*redefined-functions* nil))
  12.  
  13. (defun reset-pcl-package ()
  14.   (pcl::reset-pcl-package)
  15.   (let ((defsys (subfile '("pcl") :name "defsys")))
  16.     (setq pcl::*pcl-directory* defsys)
  17.     (load-file defsys))
  18.   (mapc #'(lambda (path)
  19.         (setf (lfi-fwd (get-loaded-file-info path)) 0))
  20.     (pcl-binary-files)))
  21.  
  22. (defun pcl-binary-files ()
  23.   (pcl::system-binary-files 'pcl::pcl))
  24.  
  25. (defun maybe-load-defsys (&optional compile-defsys-p)
  26.   (let ((defsys (subfile '("pcl") :name "defsys"))
  27.     (*use-default-pathname-type* nil)
  28.     (*skip-load-if-loaded-p* t)
  29.     (*skip-compile-file-fwd* 0))
  30.     (set 'pcl::*pcl-directory* defsys)
  31.     (when compile-defsys-p
  32.       (compile-file defsys))
  33.     (let ((b-s 'pcl::*boot-state*))
  34.       (when (and (boundp b-s) (symbol-value b-s))
  35.     #+ignore (reset-pcl-package)))
  36.     (load-file defsys)))  
  37.  
  38. (defun maybe-load-pcl (&optional force-p)
  39.   (unless (and (null force-p)
  40.            (fboundp 'pcl::system-binary-files)
  41.            (every #'(lambda (path)
  42.               (let* ((path-fwd (file-write-date path))
  43.                  (lfi (get-loaded-file-info path)))
  44.                 (and lfi path-fwd (= path-fwd (lfi-fwd lfi)))))
  45.               (pcl-binary-files)))
  46.     (let ((b-s 'pcl::*boot-state*))
  47.       (when (and (boundp b-s) (symbol-value b-s))
  48.     (reset-pcl-package)))
  49.     (pcl::load-pcl)))
  50.  
  51. (defsystem pcl
  52.     (:pretty-name "PCL")
  53.   #+akcl
  54.   (:forms 
  55.    :compile (let ((cfn (subfile '("pcl") :name "collectfn" :type "lisp")))
  56.           (unless (probe-file cfn)
  57.         (run-unix-command 
  58.          (format nil "ln -s ~A ~A"
  59.              (namestring (merge-pathnames "../cmpnew/collectfn.lsp" 
  60.                               si::*system-directory*))
  61.              (namestring cfn))))))
  62.                      
  63.   #+akcl
  64.   "collectfn"
  65.   (:forms 
  66.    :compile
  67.    (progn
  68.      (maybe-load-defsys t)
  69.      (if (and (fboundp 'pcl::operation-transformations)
  70.           (or (null (probe-file (subfile '("pcl") :name "defsys" :type "lisp")))
  71.           (every #'(lambda (trans)
  72.                  (eq (car trans) :load))
  73.              (pcl::operation-transformations 'pcl::pcl :compile))))
  74.      (maybe-load-pcl)
  75.      (let ((b-s 'pcl::*boot-state*))
  76.        (when (and (boundp b-s) (symbol-value b-s))
  77.          (reset-pcl-package))
  78.        #+akcl (compiler::emit-fn t)
  79.        #+akcl (load (merge-pathnames "../lsp/sys-proclaim.lisp" 
  80.                      si::*system-directory*))
  81.        (#+cmu with-compilation-unit #-cmu progn
  82.         #+cmu (:optimize 
  83.            '(optimize (user::debug-info #+(and small (not testing)) .5
  84.                                     #-(and small (not testing)) 2)
  85.                       (speed #+testing 1 #-testing 2)
  86.                       (safety #+testing 3 #-testing 0)
  87.                       #+ignore (user::inhibit-warnings 2))
  88.            :context-declarations
  89.            '(#+ignore
  90.              (:external (declare (user::optimize-interface 
  91.                       (safety 2) (debug-info 1))))))
  92.          (proclaim #+testing *testing-declaration* 
  93.                #-testing *fast-declaration*)
  94.          (pcl::compile-pcl))
  95.        (reset-pcl-package)
  96.        (maybe-load-pcl t)))
  97.      #+cmu (purify))
  98.    :load
  99.    (progn 
  100.      (maybe-load-pcl)
  101.      #+cmu (purify))))
  102.  
  103. (defparameter *pcl-files*
  104.   '((("systems") "lisp"
  105.      "pcl")
  106.     (("pcl") "lisp"
  107.      "sysdef"
  108.      "boot" "braid" "cache" "cloe-low" "cmu-low" "combin" "compat"
  109.      "construct" "coral-low" "cpatch" "cpl" "ctypes" "defclass" "defcombin"
  110.      "defs" "defsys" "dfun" "dlap" "env" "excl-low" "fin" "fixup" "fngen" "fsc"
  111.      "gcl-patches" "genera-low" "gold-low" "hp-low" "ibcl-low" "ibcl-patches"
  112.      "init" "iterate" "kcl-low" "kcl-patches" "lap" "low" "lucid-low" "macros"
  113.      "methods" "pcl-env-internal" "pcl-env" "pkg" "plap" "precom1" "precom2"
  114.      "precom4" "pyr-low" "pyr-patches" "quadlap" "rel-7-2-patches" "rel-8-patches"
  115.      "slots" "std-class" "sys-proclaim" "ti-low" "ti-patches" "vaxl-low" "vector" "walk"
  116.      "xerox-low" "xerox-patches")
  117.     (("pcl") "text"
  118.      "12-7-88-notes" "3-17-88-notes" "3-19-87-notes" "4-21-87-notes"
  119.      "4-29-87-notes" "5-22-87-notes" "5-22-89-notes" "8-28-88-notes"
  120.      "get-pcl" "kcl-mods" "kcl-notes" "lap" "notes" "pcl-env" "readme")))
  121.  
  122.